<%@page import="org.apache.tomcat.jni.Mmap"%>
<%@page import="RssEasy.Core.CookieHelper"%>
<%@page import="Model.My.DynamicList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
  CookieHelper cookie = new CookieHelper(request, response);
  DynamicList dy = new DynamicList(pageContext);
  DynamicList num = new DynamicList(pageContext);
  dy.request();
  int pag = Integer.parseInt(dy.get("curpage"));
  //dy.curpage = Integer.parseInt(dy.get("curpage"));
 // int pag = Integer.parseInt(dy.get("cuprage"));
  dy.select().where("myid=?",cookie.Get("myid")).get_page_desc("id");
  num.select("count(*) num").where("myid=?",cookie.Get("myid")).get_first_rows();
  int  numb = (int)Math.ceil(Integer.parseInt(num.get("num"))/10.0);
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>企企通-空间管理-企业动态</title>
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="css/dynamic.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <h1>企业动态文章管理：</h1>
        <button id="add">增加</button>
        <button id="edit">编辑</button>
        <button id="del">删除</button>
        <table border="1">
            <tr>
                <td class="tdFirst">选择</td>
                <td>标题</td>
                <td>添加时间</td>
                <td>上一次修改时间</td>
            </tr>
            <%while(dy.for_in_rows()) {%>
            <tr>
                <td><input type="checkbox" name="id" value="<%dy.write("id");%>"/></td>
                <td><%dy.write("title");%></td>
                <td rssdate="<%dy.write("shijian");%>,yyyy-MM-dd"></td>
                <td rssdate="<%dy.write("enddt");%>,yyyy-MM-dd"></td>
            </tr>
            <%}%>
        </table>
        <!--分页-->
        <div id="page">
            <a id="first" href="">首页</a>
            <a id="pervious" href="">上一页</a>
            <span><b><%=pag%></b>/<b><%=numb%></b></span>
            <a id="next" href="">下一页</a>
            <a id="last" href="">尾页</a>
            <span>跳转至</span>
            <input id="jump" type="text" name="" value="" onkeyup="value=value.replace(/[^\d]/g,'')" />
            <span id="ack">确定</span>
        </div>
        <%@include file="/inc/js_all.html" %>
        <script src="js/dynamic.js" type="text/javascript"></script>
    </body>
</html>
